<%@ page  contentType="text/html; charset=UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>山东省地下水监测系统</title>
<link href="css/login.css" rel="stylesheet" type="text/css" />
<script language="javascript">
String.propotype.trim = function()
{
	return this.replace(/(^\s*)|(\s$*)/gi,"");
}
  function checkLogin()//检查登录
  {

	  var username = document.getElementById("username").value.trim();
	  var pwd = document.getElementById("pwd").value.trim();
	  var error_name = document.getElementById("login_error_name");
	  var error_pwd = document.getElementById("login_error_pwd");
	  if(username == null || username == "")
		  {
		    error_name.innerHTML="请输入用户名";
		    return false;
		  }
	  if(pwd == null || pwd.trim().equals(""))
		 {
		  error_pwd.innserHTML="请输入密码";
		  return false;
		 }
	  return true;
  }

</script>
</head>

<body onload="document.all.username.focus();">
  <div class="login">
     <div class="login_table">
	   <div class="login_logo"><img src="images/logo.jpg" border="0"/></div>
	   <div class="login_input">
	     <form id="login" name="login" method="post" action="<%=basePath%>user/login.do" onsubmit="return checkLogin();">
	       <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
               <td align="right">用 户 名:</td>
               <td><input name="username" id="username" type="text" class="inputtxt" value="请输入用户名" onfocus="if(this.value==this.defaultValue)this.value=''" onblur="if(this.value=='')this.value=this.defaultValue;"/><span id="login_error_name" class="err_txt"></span></td>
               
             </tr>
             <tr>
               <td align="right">密 &nbsp; 码：</td>
               <td><input name="pwd" id="pwd" type="password" class="inputtxt"/><span id="login_error_pwd" class="err_txt"></span></td>
             </tr>
             <tr>
               <td colspan="2" align="center"><input type="submit" class="loginbtn" value=""/></td>
             </tr>
           </table>
	       
	     </form>
       </div>
	 </div>
  </div>
  <div class="btmbg"><img src="images/btmbg.jpg" width="100%" border="0"/></div>
</body>
</html>
